﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Visifire.Gauges;

namespace CPPEI.Coolzon.UI.DataPartLib
{
    public partial class DataGaugeDoubleCircularScale
    {
        public CircularScale SetCircular1Scale(CircularScale circular1Scale)
        {
            circular1Scale.Name = PRIMARYSCALE;
            circular1Scale.BorderBrush = Circular1BorderBrush==null? null : Circular1BorderBrush.Brush;
            circular1Scale.BorderThickness = Circular1BorderThickness;
            circular1Scale.Background = Circular1Background==null? null : Circular1Background.Brush;
            circular1Scale.Interval = Circular1Interval ?? Double.NaN;
            circular1Scale.Logarithmic = Circular1Logarithmic;
            circular1Scale.LogarithmBase = Circular1LogarithmBase;
            circular1Scale.Maximum = Circular1Maximum;
            circular1Scale.Minimum = Circular1Minimum;
            circular1Scale.Prefix = Circular1Prefix;
            circular1Scale.Radius = Circular1Radius;
            circular1Scale.ScalingSet = Circular1ScalingSet;
            circular1Scale.ShadowEnabled = Circular1ShadowEnabled;
            circular1Scale.StartAngle = Circular1StartAngle;
            circular1Scale.Suffix = Circular1Suffix;
            circular1Scale.SweepAngle = Circular1SweepAngle;
            circular1Scale.ToolTipText = Circular1ToolTipText;
            if (Circular1ScaleThickness != null && Circular1ScaleThickness >= 0 && Circular1ScaleThickness <= 1)
            {
                circular1Scale.ScaleThickness = Circular1ScaleThickness;
            }
            else
            {
                circular1Scale.ScaleThickness = null;
            }
            if (Circular1CenterX != null && Circular1CenterY != null && Circular1CenterX.Value >= 0 && Circular1CenterX.Value <= 1 && Circular1CenterY.Value >= 0 && Circular1CenterY.Value <= 1)
                circular1Scale.Center = new Point(Circular1CenterX.Value, Circular1CenterY.Value);
            else
                circular1Scale.Center = null;

            return circular1Scale;
        }
        private BrushEx circular1BorderBrush;
        private Thickness circular1BorderThickness;
        private BrushEx circular1Background;
        private double? circular1Interval;
        private bool circular1Logarithmic;
        private int circular1LogarithmBase;
        private double? circular1Maximum;
        private double? circular1Minimum;
        private string circular1Prefix;
        private double? circular1Radius;
        private string circular1ScalingSet;
        private bool circular1ShadowEnabled;
        private double? circular1StartAngle;
        private string circular1Suffix;
        private double? circular1SweepAngle;
        private string circular1ToolTipText;

        private double? circular1ScaleThickness;
        private double? circular1CenterX;
        private double? circular1CenterY;

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺边框颜色")]
        [Description("Circular1BorderBrush")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1BorderBrush", "标尺边框颜色")]
        public BrushEx Circular1BorderBrush
        {
            get
            {
                return circular1BorderBrush;
            }

            set
            {
                circular1BorderBrush = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺边框大小")]
        [Description("Circular1BorderThickness")]
        [Editor(typeof(UI.XProperty.Editors.XThicknessEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1BorderThickness", "标尺边框大小")]
        public Thickness Circular1BorderThickness
        {
            get
            {
                return circular1BorderThickness;
            }

            set
            {
                circular1BorderThickness = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺背景颜色")]
        [Description("Circular1Background")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1Background", "标尺背景颜色")]
        public BrushEx Circular1Background
        {
            get
            {
                return circular1Background;
            }

            set
            {
                circular1Background = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺步长")]
        [Description("Circular1Interval")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1Interval", "标尺步长")]
        public double? Circular1Interval
        {
            get
            {
                return circular1Interval;
            }

            set
            {
                circular1Interval = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺是否对数显示")]
        [Description("Circular1Logarithmic")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1Logarithmic", "标尺是否对数显示")]
        public bool Circular1Logarithmic
        {
            get
            {
                return circular1Logarithmic;
            }

            set
            {
                circular1Logarithmic = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺对数显示基数")]
        [Description("Circular1LogarithmBase")]
        [Editor(typeof(UI.XProperty.Editors.XIntEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1LogarithmBase", "标尺对数显示基数")]
        public int Circular1LogarithmBase
        {
            get
            {
                return circular1LogarithmBase;
            }

            set
            {
                circular1LogarithmBase = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺最大值")]
        [Description("Circular1Maximum")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1Maximum", "标尺最大值")]
        public double? Circular1Maximum
        {
            get
            {
                return circular1Maximum;
            }

            set
            {
                circular1Maximum = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺最小值")]
        [Description("Circular1Minimum")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1Minimum", "标尺最小值")]
        public double? Circular1Minimum
        {
            get
            {
                return circular1Minimum;
            }

            set
            {
                circular1Minimum = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺前缀")]
        [Description("Circular1Prefix")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1Prefix", "标尺前缀")]
        public string Circular1Prefix
        {
            get
            {
                return circular1Prefix;
            }

            set
            {
                circular1Prefix = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺半径")]
        [Description("Circular1Radius")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1Radius", "标尺半径")]
        public double? Circular1Radius
        {
            get
            {
                return circular1Radius;
            }

            set
            {
                circular1Radius = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺缩放")]
        [Description("Circular1ScalingSet")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1ScalingSet", "标尺缩放")]
        public string Circular1ScalingSet
        {
            get
            {
                return circular1ScalingSet;
            }

            set
            {
                circular1ScalingSet = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺是否显示阴影")]
        [Description("Circular1ShadowEnabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1ShadowEnabled", "标尺是否显示阴影")]
        public bool Circular1ShadowEnabled
        {
            get
            {
                return circular1ShadowEnabled;
            }

            set
            {
                circular1ShadowEnabled = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺起始角度")]
        [Description("Circular1StartAngle")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1StartAngle", "标尺起始角度")]
        public double? Circular1StartAngle
        {
            get
            {
                return circular1StartAngle;
            }

            set
            {
                circular1StartAngle = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺后缀")]
        [Description("Circular1Suffix")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1Suffix", "标尺后缀")]
        public string Circular1Suffix
        {
            get
            {
                return circular1Suffix;
            }

            set
            {
                circular1Suffix = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺范围角度")]
        [Description("Circular1SweepAngle")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1SweepAngle", "标尺范围角度")]
        public double? Circular1SweepAngle
        {
            get
            {
                return circular1SweepAngle;
            }

            set
            {
                circular1SweepAngle = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺提示")]
        [Description("Circular1ToolTipText")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1ToolTipText", "标尺提示")]
        public string Circular1ToolTipText
        {
            get
            {
                return circular1ToolTipText;
            }

            set
            {
                circular1ToolTipText = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺宽度(0-1)")]
        [Description("Circular1ScaleThickness")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1ScaleThickness", "标尺宽度(0-1)")]
        public double? Circular1ScaleThickness
        {
            get
            {
                return circular1ScaleThickness;
            }

            set
            {
                circular1ScaleThickness = value;
                Refresh();
            }
        }

        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺圆心X(0-1)")]
        [Description("Circular1Center")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1Center", "标尺圆心X(0-1)")]
        public double? Circular1CenterX
        {
            get
            {
                return circular1CenterX;
            }

            set
            {
                circular1CenterX = value;
                Refresh();
            }
        }
        [Category("第一表盘标尺")]
        [DisplayName("第一表盘标尺圆心Y(0-1)")]
        [Description("Circular1CenterY")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular1CenterY", "标尺圆心Y(0-1)")]
        public double? Circular1CenterY
        {
            get
            {
                return circular1CenterY;
            }

            set
            {
                circular1CenterY = value;
                Refresh();
            }
        }
    }
}
